package com.room.search.web.rest;

import com.room.search.response.RoomResult;
import com.room.search.service.baidu.BaiduMapService;
import com.room.search.service.dto.baidu.BaiduQueryAroundDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * By   : ghd.bright
 * Time : 2022/3/23
 * Description: 百度API服务
 */
@RestController
@RequestMapping("/api/baidu")
public class BaiduResource {

    private final BaiduMapService baiduMapService;

    public BaiduResource(BaiduMapService baiduMapService) {
        this.baiduMapService = baiduMapService;
    }

    @GetMapping("/around")
    public RoomResult getAround(BaiduQueryAroundDTO dto) {
        return baiduMapService.getAround(dto);
    }
}
